<template>
	<view style="margin-top: 196rpx;margin-left: 10rpx;margin-right: 10rpx;">
		<navbox title="修改个性签"></navbox>
		<u--textarea v-model="user.userTab" placeholder="请输入内容" border="bottom" count ></u--textarea>
		<view style="height: 150rpx;width: 100%;"></view>
		<u-button type="primary" text="确定" @click="edi()"></u-button>
	</view>
</template>

<script>
	import navbox from '../components/navbox/navbox.vue'
	export default {
		data() {
			return {
				user:uni.getStorageSync("user")
			}
		},
		methods: {
			async edi(){
				const res = await this.$myRuquest({
					url: '/wexinLogin/setTab?userId=' + this.user.id+'&tab='+this.user.userTab,
					method: 'post',
				})
				if(res.data.code===200){
					uni.setStorageSync("user",this.user)
					uni.switchTab({
						url:'/pages/index/index'
					})
				}
				uni.showToast({
					title:res.data.code===200?'修改成功':'修改失败',
					icon:'none'
				})
			}
		},
		components: {
			"navbox": navbox
		},
	}
</script>

<style>

</style>
